﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations.Schema;

namespace WaterRevenueMS.Componnent.Data.Mapping.BaseData
{
    partial class AreaMap
    {
        partial void AreaMapAppend()
        {
            this.HasKey(t => t.Id);
            this.Property(t => t.Qu_YMC)
                .HasMaxLength(16);
            this.Property(t => t.Qu_YBH)
                .HasMaxLength(16);

            this.ToTable("Bsc_Qu_YSZ");
            this.Property(t => t.Id).HasColumnName("Qu_YSZ_ID")
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);

            this.HasOptional(t => t.CompanySet).WithMany(d => d.Area).HasForeignKey(t => t.Dan_WSZ_No);//单位代码关联
            this.HasOptional(t => t.MeterMan).WithMany(d => d.Areas).HasForeignKey(t => t.Chao_BY_No);//抄表员关联
            

        }
    }
}
